@extends('layouts.app')

@section('title','editMatch')s

@section('content')
    <div class="container">
        <div class="row">
            <header class="list-header">
                    <a href="{{route('match.index')}}"><i class="fa fa-arrow-circle-left fa-lg" aria-hidden="true"></i>返回</a>
            </header>
            <span>修改培训</span>
            {!! Form::model($matches, ['action' => ['MatchController@update',$matches->id], 'files' => true]) !!}
            <input name="_method" type="hidden" value="PATCH">
            {{ csrf_field() }}
            <div class="form-group{{ $errors->has('match_name')?'has-error':'' }}">
                        {!! Form::label('match_name', '比赛名称:')!!}
                        {!! Form::text('match_name',null,['class'=>'form-control'])!!}
                        @if ($errors->has('match_name'))
                            <span class="help-block">
                                <strong>{{ $errors->first('match_name') }}</strong>
                            </span>
                        @endif
                    </div>
                     <div class="form-group{{ $errors->has('match_intro')?'has-error':'' }}">
                        {!! Form::label('match_intro',' 比赛简介:') !!}
                        {!! Form::textarea('match_intro',null,['class'=>'form-control']) !!}
                        @if ($errors->has('match_intro'))
                            <span class="help-block">
                                <strong>{{ $errors->first('match_intro') }}</strong>
                            </span>
                        @endif
                    </div>
                    <div class="form-group">
                        {!! Form::label('match_picture','比赛图片')!!}
                        {!! Form::file('match_picture') !!}
                        @if ($errors->has('match_picture'))
                            <div class="help-block">
                                <strong>{{ $errors->first('match_picture') }}</strong>
                            </div>
                        @endif
                    </div>
                   
                    <div class="form-group{{ $errors->has('match_ip')?'has-error':'' }}">
                        {!! Form::label('match_ip', '比赛官网:')!!}
                        {!! Form::text('match_ip',null,['class'=>'form-control'])!!}
                        @if ($errors->has('match_ip'))
                            <span class="help-block">
                                <strong>{{ $errors->first('match_ip') }}</strong>
                            </span>
                        @endif
                    </div>
                    <div class="form-group{{ $errors->has('match_date')?'has-error':'' }}">
                       {!! Form::label('match_date','比赛时间:') !!}
                        {!! Form::text('match_date',null,['class'=>'form-control']) !!}
                        @if ($errors->has('match_date'))
                            <span class="help-block">
                                <strong>{{ $errors->first('match_date') }}</strong>
                            </span>
                        @endif
                    </div>






              {!! Form::submit('更新活动信息',['class'=>"btn btn-success"]); !!}
                    {!! Form::close() !!}            
                </div>
                <div id="debug"></div>
        </div>
    </div>
@endsection